import request from "@/utils/request";
import { ITitleParams } from "./data.d";

// 获取医师职称列表
export async function titles(params: ITitleParams): Promise<any> {
	return request({
		url: "/nutrition/admin/dict/selectByPCode",
		method: "get",
		params,
	});
}

// 获取营养项目列表
export async function nutritionItems(params: { type: 1 | 2 }): Promise<any> {
	return request({
		url: "/nutrition/admin/nutProject/select_pagination",
		method: "get",
		params,
	});
}

// 获取医院科室列表
export async function departments(params: { id: number }): Promise<any> {
	return request({
		url: "/nutrition/admin/nutInstitutionDepartment/institutionDepartmentList",
		method: "get",
		params,
	});
}

// 获取医疗机构列表
export async function institutions(): Promise<any> {
	return request({
		url: "/nutrition/admin/medicalInstitution/medicalInstitutionNameList",
		method: "get",
	});
}
